<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
    <meta name="keywords" content="P2P网贷平台,P2P理财,投哪网,广发证券,广发信德,融信财富">
    <meta name="description" content="投哪网p2p网贷平台（www.touna.cn）是广发证券旗下互联网金融领域领先的P2P理财平台（原融信财富）,践行普惠金融,为投资理财用户提供安全高收益的P2P网站产品；借款人可通过平台申请贷款,获得融资解决短期资金需求">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="投哪网">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
	<title>极速借款</title>
    <link rel="stylesheet" type="text/css" href="base.css"/>
    <script type="text/javascript" src="flexible.js"></script>
</head>
<body style="">
	<header>
		<img src="banner_new_noLogo.png" class="img" />
	</header>
	<nav>
		<ul class="ul_tile">
			<li>
				<span class="iconNav iconNav1"></span>
				<p>2-50万额度</p>
			</li>
			<li>
				<span class="iconNav iconNav2"></span>
				<p>正规平台</p>
			</li>
			<li>
				<span class="iconNav iconNav3"></span>s
				<p>无需押车</p>
			</li>
			<li>
				<span class="iconNav iconNav4"></span>
				<p>手续简单</p>
			</li>
		</ul>
	</nav>
	<section class="form_input">
		<div class="iptbox">
			<label>
				<img class="iconInput iconInput1" src="icon1@2x.png"/>
			</label>
			<input type="tel" maxlength="7" placeholder="请输入您的借款金额" id="rb_money"/>
			<span class="money">元</span>
		</div>
		<div class="iptbox">
			<label>
				<img class="iconInput iconInput1" src="icon1@2x.png"/>
			</label>
			<div class="addUserBorrow rBRegion">
				<select id="selectValue" value="">
					<option value="" selected="true" disabled="true">借款用途</option>
					<option value="生产">生产</option>
					<option value="经营">经营</option>
					<option value="旅游">旅游</option>
					<option value="装修">装修</option>
					<option value="培训学习">培训学习</option>
					<option value="购买原材料">购买原材料</option>
					<option value="开店">开店</option>
					<option value="购车">购车</option>
					<option value="婚庆">婚庆</option>
					<option value="留学">留学</option>
					<option value="整形美容">整形美容</option>
					<option value="子女教育">子女教育</option>
				</select>
				<i class="under" style="right: 0.4rem"></i>
			</div>
		</div>
		<div class="iptbox">
			<label>
				<img class="iconInput iconInput1" src="touTiaoNew_type.png"/>
			</label>
			<div class="addUserBorrow rBRegion">
				<select id="selectTypeValue" value="">
					<option value="" selected="true" disabled="true">车辆购买方式</option>
					<option value="全款">全款</option>
					<option value="按揭">按揭</option>
					<option value="名下无车">名下无车</option>
				</select>
				<i class="under" style="right: 0.4rem"></i>
			</div>
		</div>
		<div class="iptbox">
			<label>
				<img class="iconInput iconInput2" src="icon2@2x.png" />
			</label>
			<input type="text" class="name" id="rb_name" maxlength="18" placeholder="请输入您的姓名" />
		</div>
		<article class="coverThe">
			<div class="iptbox">
				<label>
					<img class="iconInput iconInput3" src="icon4@2x.png"/>
				</label>
				<input type="text" readonly="readonly"/>
				<div class="ressBox">
	                <div class="rBRegion rBRegion-province" >
	                    <em>请选择省市</em>
	                    <i class="under"></i>
	                    <aside class="select_list">
	                    </aside>
	                </div>
	                <div class="rBRegion rBRegion-city">
	                    <em>请选择市县</em>
	                    <i class="under"></i>
	                    <aside class="select_list"></aside>
	                </div>
				</div>
			</div>
			<div class="iptbox">
				<label>
					<img class="iconInput iconInput4" src="icon3@2x.png"/>
				</label>
				<input type="tel" maxlength="11" placeholder="请输入您的11位手机号" id="phone"/>
			</div>
		</article>
		<aside class="error hide">这里是错误提示</aside>
		<button type="submit" class="sub_rapid" id="sub_rapid">立即申请</button>
	</section>
	<aside><img src="content_new_1.png" class="img" /></aside>
	<section class="webstat">
		<!--<p class="stat_title">只需4步，轻松拿到钱</p>-->
		<div class="stat_contant">
			<!--<h1>袋吧</h1>-->
			<p>车照开，款照拿</p>
			<p>2万~50万灵活额度</p>
		</div>
		<dl class="stat_condi clearfix">
			<dt>申请条件</dt>
			<dd>
				你是爱车的主人：18-60周岁<br />
				爱车年龄：≤8年
			</dd>
		</dl>
	</section>
	<div class="copyright bottomText">
		<p>受个人情况影响，放款时间、金额以实际撮合完成时间为准</p>
	</div>
	<footer class="footer hide">
		<div class="footerBox">
			<a href="javascript:;" class="jump">立即申请</a>
			<span class="hotline"><a href="tel:18356439326"><i class="iconFooter iconFooter1"></i>服务热线：183 5643 9326</a></span>
			<a href="javascript:;" class="close iconFooter iconFooter2"></a>
		</div>
	</footer>

	<div class="toast"></div>
<script type="text/javascript" src="zepto.min.js"></script>
<script type="text/javascript">
//先点击选择市县
$('.rBRegion-city').click(function() {
	if($('.rBRegion-province em').html() === '请选择省市') {
		$('.rBRegion-city').children("aside").toggle();
		// $('.rBRegion-city').children("i.under").toggleClass("underNext");
		$('.error').show().html('请先选择省市');
		return false;
	}
	$('.rBRegion-province aside').hide()
});

 $('.rBRegion-province').click(function() {
	$('.rBRegion-city aside').hide();
 });

//
$('input').on('focus',function() {
	$('.rBRegion aside').hide();
});

//footer跳转动画
var scrNav = $('nav').offset().top;
$('.jump').click(function(){
	animateScroll(document.body,scrNav);
});

function animateScroll(ele,pos){
	var num = (ele.scrollTop>pos?ele.scrollTop:pos)/32,
		timer = setInterval(ele.scrollTop>pos?down:up, 16);
	function up(){
			if(ele.scrollTop + num >= pos){
				ele.scrollTop = pos;
				clearInterval(timer);
			}else{
				ele.scrollTop += num;
			}
	}
	function down(){
			if(ele.scrollTop - num <= pos){
				ele.scrollTop = pos;
				clearInterval(timer);
			}else{
				ele.scrollTop -= num;
			}
	}
}

//footer开启关闭动画
$(this).on('scroll',function(){
	var scrDistance = $(this).scrollTop(),
		heightDiv = $('.coverThe').height(),
		heightBtn = $('.sub_rapid').height()/2,
		offBtn = ($('.sub_rapid').offset().top + heightDiv) / 2 - heightBtn
		if(scrDistance >= offBtn && (!$('footer').data('closeState'))){
			$('footer').removeClass('hide').removeClass('hiddenAway2').addClass('hiddenAway');
		}else{
			$('footer').removeClass('hiddenAway').addClass('hiddenAway2');
		}
});

$('.close').click(function(){
	$('footer').removeClass('hiddenAway').addClass('hiddenAway2').data('closeState',true);
});

//下拉列表切换
$(".rBRegion").click(function(){
	$(this).children("aside").toggle();
	// $(this).children("i.under").toggleClass("underNext");
});

$('.rBRegion').on('click','.select_list i',function(){
	var that = $(this),
		text = that.html();
	that.parent().parent().children('em').html(text);
	that.addClass('active').siblings().removeClass('active');
});

$('.rBRegion-province').click(function () {

    var cLen = $(this).find('.select_list').children().length;
    if (cLen > 0) {
        return false;
    }

    $.get('/chedai/get-province-list', {}, function (rs) {
        var list = '';
        for (var i = 0; i < rs.length; i++) {
            list += '<i>' + rs[i].name + '<input class="provinceID" type="hidden" value="' + rs[i].id + '"></i>';
        }
        $('.rBRegion-province').find('.select_list').empty().append(list);
    }, 'json');
});

$('.rBRegion-province .select_list').on('click','i',function(){
	$('.rBRegion-city em').html('请选择市县').siblings('i').addClass('under');
	var that = $(this);
    $('.rBRegion-province .select_list').find('i').each(function () {
        $(this).removeClass('active');
    });
    that.addClass('active');

	var pid = that.children('.provinceID').val();
    $.get('/chedai/get-city-list', {'pid':pid}, function (rs) {
        if (rs.errno != 0) {
            $('.error').show().html('城市信息获取失败');
            return false;
        }
        var list = '';
        for (var i = 0; i < rs.data.length; i++) {
            list += '<i>' + rs.data[i].name + '<input class="cityID" type="hidden" value="' + rs.data[i].id + '"></i>';
        }
        $('.rBRegion-city').find('.select_list').empty().append(list);
    }, 'json');
});

$('.rBRegion-city .select_list').on('click','i',function(){
    var that = $(this);
    $('.rBRegion-city .select_list').find('i').each(function () {
        $(this).removeClass('active');
    });
    that.addClass('active');
});

$('#sub_rapid').click(function () {
    var money = $('#rb_money').val();
    if (money.length == 0 || money == 0) {
        $('.error').show().html('借款金额填写有误');
        return false;
    }
    var pur = $('#selectValue').attr('value');
    var type = $('#selectTypeValue').attr('value');
    var name = $('#rb_name').val();
    if (name.length == 0) {
        $('.error').show().html('请输入您的姓名');
        return false;
    }
    var province = $('.rBRegion-province .select_list').find('i.active').text();
    var city = $('.rBRegion-city .select_list').find('i.active').text();
    var mobile = $('#phone').val();
    if (mobile.length == 0) {
        $('.error').show().html('请输入您的手机号码');
        return false;
    }

    $.post('/chedai/do-loan', {
        'money':money,
        'pur':pur,
        'type':type,
        'name':name,
        'province':province,
        'city':city,
        'mobile':mobile,
    }, function (rs) {
        if (rs.errno != 0) {
            $('.error').show().html(rs.error);
            return false;
        }
        window.location.href='/site/ok';
    }, 'json');
});

$('#selectValue').on('change', function () {
    var that = $(this);
    that.attr('value', that.val());
});

$('#selectTypeValue').on('change', function () {
    var that = $(this);
    that.attr('value', that.val());
});



</script>
</body>
</html>
